﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="details.aspx.vb" Inherits="JamaicanKitchen.details" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" AllowSorting="True">
            <Columns>
                <asp:BoundField DataField="FoodName" HeaderText="FoodName" 
                    SortExpression="FoodName" />
                <asp:BoundField DataField="RatingStars" HeaderText="RatingStars" 
                    SortExpression="RatingStars" />
                <asp:BoundField DataField="ServingSuggestion" HeaderText="ServingSuggestion" 
                    SortExpression="ServingSuggestion" />
                <asp:ImageField DataImageUrlField="FoodImage" HeaderText="Thumbnail">
                    <ControlStyle Height="170px" Width="170px" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:JamaicanConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:JamaicanConnectionString.ProviderName %>" 
            
            SelectCommand="SELECT [FoodName], [FoodImage], [RatingStars], [ServingSuggestion], [ID] FROM [jamaicankitchen] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
</p>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource2">
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" 
                    SortExpression="Author" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:BoundField DataField="CommentBody" HeaderText="CommentBody" 
                    SortExpression="CommentBody" />
                <asp:BoundField DataField="food_fkID" HeaderText="food_fkID" 
                    SortExpression="food_fkID" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:JamaicanConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:JamaicanConnectionString.ProviderName %>" 
            SelectCommand="SELECT [Author], [Title], [CommentBody], [food_fkID] FROM [Comments] WHERE ([food_fkID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="food_fkID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        Title&nbsp; 
        <asp:TextBox ID="tb_title" runat="server" Width="171px"></asp:TextBox>
</p>
    <p>
        <asp:TextBox ID="tb_comment" runat="server" Height="119px" TextMode="MultiLine" 
            Width="299px"></asp:TextBox>
    <br />
</p>
    <p>
        <asp:Button ID="btn_AddComment" runat="server" Text="Add Comment" 
            Width="112px" />
</p>
<p>
</p>
    <p>
        <asp:CheckBoxList ID="cb_tags" runat="server" 
            DataSourceID="SqlDataSource3" DataTextField="TagName" DataValueField="ID" 
            RepeatDirection="Horizontal">
        </asp:CheckBoxList>
        <br />
        <asp:Button ID="btn_AddTags" runat="server" Text="Tag Food" Width="125px" />
        
        &nbsp; Add New Tag<asp:TextBox ID="tb_NewTag" runat="server"></asp:TextBox>
        <asp:Button ID="btn_NewTag" runat="server" Text="Button" Width="88px" />

        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:JamaicanConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:JamaicanConnectionString.ProviderName %>" 
            SelectCommand="SELECT [ID], [TagName] FROM [Tags]"></asp:SqlDataSource>
</p>
    <p>
        
</p>
    
    <p>
        
        &nbsp;<p>
        <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="SqlDataSource5" Width="353px">
            <Columns>
                <asp:BoundField DataField="Dish" HeaderText="Dish" SortExpression="Dish" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="LikeDish.aspx?ID={0}" Text="Like" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
            ConnectionString="<%$ ConnectionStrings:JamaicanConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:JamaicanConnectionString.ProviderName %>" 
            SelectCommand="SELECT * FROM [DishRatings]"></asp:SqlDataSource>
    </p>
    <p>
        
</p>
    <p>
        
</p>
<p>
</p>
</asp:Content>
